<%@tag import="java.sql.Connection"%>
<%@tag import="by.epam.communalservices.entity.JkhTeam"%>
<%@tag import="by.epam.communalservices.utils.Staff"%>
<%@tag import="java.util.List"%>

<%@ attribute name="id" required="true"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
    Staff staff = new Staff((Connection) request.getSession().getAttribute("currentConnection"));
    List<JkhTeam> teamList = staff.getWorkerStaff(Long.parseLong(getJspContext().getAttribute("id").toString()));
    getJspContext().setAttribute("teamCount",teamList.size());
%>

<c:if test="${teamCount eq 0}">
  <jsp:doBody/>
</c:if>
